package com.springlearn.springsourcecode.chap7;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.DisposableBean;

import javax.annotation.PreDestroy;

/**
 * @author wtcode
 * @Description
 * @date 2025/3/31 - 11:06
 */
public class Bean2 implements DisposableBean {
    private final static Logger log = LoggerFactory.getLogger(Bean2.class);

    @PreDestroy
    public void destory1(){
        log.debug("销毁1");
    }


    @Override
    public void destroy() throws Exception {
        log.debug("销毁2");
    }


    public void destory3(){
        log.debug("销毁3");
    }
}
